
package coop.bancocredicoop.proyectos.gd

import java.io.FileInputStream

class DocumentFile {

    def baseDir
    def fileName

    def DocumentFile(baseDir, fileName) {
        this.baseDir = baseDir
        this.fileName = fileName
    }

    private def getFullPath() {
        "${baseDir}/${fileName}"
    }

    def getInputStream() {
        
        def inputStream = new FileInputStream(getFullPath())
        inputStream

    }

    def getOriginalFilename() {
        fileName
    }

    def delete() {
        new File(getFullPath()).delete()
    }

}

